package com.hardydou.framework.web;

import org.springframework.boot.web.server.ErrorPage;
import org.springframework.boot.web.server.ErrorPageRegistrar;
import org.springframework.boot.web.server.ErrorPageRegistry;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;

/**
 * @author hardydou
 */
@Component
public class ErrorPageConfig implements ErrorPageRegistrar {
    @Override
    public void registerErrorPages(ErrorPageRegistry registry) {
//        ErrorPage page_404 = new ErrorPage(HttpStatus.NOT_FOUND, "/error/404");
//        registry.addErrorPages(page_404);
//        ErrorPage page_500 = new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/error/500");
//        registry.addErrorPages(page_500);
    }
}
